from pymongo import MongoClient
import time

#实例化
client = MongoClient(host="mongodb://127.0.0.1",port=27017)

data = client['good']['good']
# mess = data.insert({'x':1})

# 查找
mess_2 = data.find()

time_1 = time.time()

#增加数据
for i in range(100000):
    # data.update({},{'$push':{'z':1}})
    data.update({}, {'$inc': {'x': 1}})

mess_3 = data.find()

print(time.time()-time_1)